There are many computer programs to help a musician practice and/or compose music. For example, one such program is discussed in U.S. Pat. No. 5,990,407, which is incorporated by reference into this patent application. This program allows users to type in a chord progression, and then adds an improvisation to it as follows. The program works by looking at the first part of the user's chord progression (e.g. 4 bars|Dm7|G7|C|Bb7|A7) and then comparing it with a database of chord progressions that also have professional musical solos (riffs) recorded and stored as digital audio. When the program finds an exact chord progression match (Dm7|G7) the program selects that solo performance and starts to build the solo. Since the program has now written 2 bars, it moves to bar 3, where the chord progression is |C|Bb7|A7, and searches for an exact chord progression match.
Unfortunately there are a couple of problems with this program. The current program requires a large number of riffs so that an exact match for each possible chord progression can be found. Because storing digital audio requires a large storage space, storing a large number of riffs in digital audio requires a lot of disk space. Also, because the program searches for an exact match, a long riff that has a similar but not identical chord progression to the user's chord progression would be rejected. Thus, the riffs chosen by the program are usually short, no more than a few beats or bars. This makes the composition sound unnatural, unlike longer riffs that sound more complete and musically pleasant. Also, because the program searches for an exact match, riffs with notes that would sound good over the user's chord would be rejected.
If the program allowed the same riff to be used over many different chord progressions, instead of just one, fewer riffs would be required and thus less disk space would be needed. In addition, if the program allowed riffs with compatible notes but not identical chords to be chosen, fewer riffs would be required and more varied compositions could be created.